//
// Created by lucy on 1/15/2024.
//

#include <iostream>


class Person
{
public:

    int getAge() const;

    void setAge(int age);

    void display() const;

private:
    int score{};
    int age{};
};

int Person::getAge() const
{
    return age;
}

void Person::setAge(int age)
{
    if (age >= 0 && age <= 120)
    {
        this->age = age;
    }
}

void Person::display() const
{
    std::cout << "Age =  " << this->age << ", Score = " << this->score << std::endl;
}

int main()
{

    Person p = Person{};
    p.setAge(10);
    p.display();
    return 0;
}